﻿
@{
    ViewBag.Title = "EmployeePageList";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css{
    <link rel="stylesheet" href="~/assets/portal/assets/css/common.css" />
    <link rel="stylesheet" href="~/bussiness/js/base/reset.css" />
    <link rel="stylesheet" href="~/bussiness/js/pg/Performance/edit.css" />
    <style>

        #editor—wrapper {
            /*max-width: 90%;*/
            width:1200px!important;
            border: 1px solid #ccc;
            z-index: 100; /*  按需定义 */
        }

        .title {
            font-weight: bolder;
        }

        #toolbar-container {
            border-bottom: 1px solid #ccc;
        }

        #editor-container {
            min-height: 310px;
            margin-bottom: 200px;
        }

            #editor-container .title::before {
                content: ""
            }

        .ant-select-arrow, .ant-select-clear {
            position: absolute;
            right: 10px;
        }

        .stitle {
            font-size: 16px;
            font-weight: 600;
            color: #424758;
            display: flex;
            align-items: center;
        }
       .stitle::before {
                content: "";
                margin-right: 10px;
                display: inline-block;
                width: 4px;
                height: 18px;
                background: #0064E5;
            }
        .stable {
            border-collapse: collapse; /* 折叠边框，使之变为单一线划分 */
            border: 1px solid #e1e5ea; /* 设置表格、表头、单元格边框 */
            width: 100%;
            margin-top: 20px;
            max-height: 800px;
            overflow-y: scroll;
        }

            .stable th {
                background: #f2f6f9;
                font-size: 14px;
                font-weight: 600;
            }

            .stable th, .stable td {
                border: 1px solid #e1e5ea; /* 设置表格、表头、单元格边框 */
                text-align: center;
                height: 48px;
            }
    </style>
}
<div id="SafetySystemIOHSADD" class="font-['SourceHanSansSC']">
    <a-style-provider hash-priority="high">
        <a-config-provider :locale="vlocale">
            <a-image :width="200"
                     :style="{ display: 'none',zIndex:100 }"
                     :preview="{visible:SafetySystemIOHSADDParams.previewShow.value,onVisibleChange:SafetySystemIOHSADDParams.setVisible}" :src="SafetySystemIOHSADDParams.imgUrl.value"></a-image>
            <m-pdf-pop-model></m-pdf-pop-model>
            <header class="px-5 box-border">
                <div class="flex items-center">
                    <div class="w-full h-[48px] text-[13px]  rounded-lg mx-auto my-[10px]  bg-white  text-[#888888] text-3xl flex items-center px-10">   <div class="w-22 h-22 bg-blue-200 mr-5"> <img class="w-full h-full cursor-pointer" v-on:click="SafetySystemIOHSADDParams.vvback()" src="~/Assets/nimgs/exit.png" alt="返回" /></div> <span class="text-[]">体系运行<span class="mx-2">/</span>危险四表<span class="mx-2">/</span><span class="text-[#424758] text-[15px]">{{SafetySystemIOHSADDParams.uniDesc.value}}</span> </span>  </div>
                </div>
                <a-card :bordered="true" class="w-full  mt-12">
                    <template #title>
                        <div class="w-full flex justify-between items-center;" >
                            <div class="flex items-center"> <div>{{SafetySystemIOHSADDParams.uniDesc.value}}</div> <div class="ml-7"></div></div>
                        </div>
                    </template>
                    <a-spin :spinning="SafetySystemIOHSADDParams.uploadLock.value" tip="加载中，请耐心等待..." />
                    <a-form style="margin-top:10px"
                            ref="FormRule"
                            :rules="SafetySystemIOHSADDParams.rules.value"
                            :model="SafetySystemIOHSADDParams.formData.value">
                        <a-form-item label="标题：" name="Title">
                            <a-input placeholder="请输入标题" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" v-model:value="SafetySystemIOHSADDParams.formData.value.Title" style="max-width:80%;min-width:800px;width:auto" />
                        </a-form-item>
                        <a-form-item label="年度：">
                            <a-select allow-clear
                                      placeholder="请选择年度"
                                      :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9"
                                      v-model:value="SafetySystemIOHSADDParams.formData.value.Years"
                                      :options="SafetySystemIOHSADDParams.yearlist.value"
                                      style="max-width: 80%; min-width: 800px; width: auto">

                            </a-select>
                        </a-form-item>
                        <a-form-item label="部门：">
                            <a-select allow-clear
                                      placeholder="请选择部门"
                                      show-search
                                      disabled
                                      :filter-option="SafetySystemIOHSADDParams.filterOption"
                                      v-model:value="SafetySystemIOHSADDParams.formData.value.DepartmentId"
                                      :options="SafetySystemIOHSADDParams.deptList.value"
                                      style="max-width: 80%; min-width: 800px; width: auto">

                            </a-select>
                        </a-form-item>
                        <a-form-item label="类型：">
         
                            <a-select placeholder="请选择类型"
                                      show-search
                                      :disabled="!['UR','HKEF'].includes(SafetySystemIOHSADDParams.urlinfo.value.target.split('|')[0])||SafetySystemIOHSADDParams.isPermiss.value"
                                      :filter-option="SafetySystemIOHSADDParams.filterOption"
                                      v-model:value="SafetySystemIOHSADDParams.formData.value.Type"
                                      :options="SafetySystemIOHSADDParams.typelist.value"
                                      style="max-width: 80%; min-width: 800px; width: auto">

                            </a-select>
                        </a-form-item>


                        <a-space>
                            <a-form-item label="总数：">
                                <a-input-number  style="width:120px" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" v-model:value="SafetySystemIOHSADDParams.formData.value.Total" :min="0" addon-after="条" />
                            </a-form-item>
                            <template v-if="['UR','IOHS'].includes(SafetySystemIOHSADDParams.urlinfo.value.target.split('|')[0])">
                                <a-form-item label="A级数量：">
                                    <a-input-number style="width:120px" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" v-model:value="SafetySystemIOHSADDParams.formData.value.Total_A" :min="0" addon-after="条" />
                                </a-form-item>
                                <a-form-item label="B级数量：">
                                    <a-input-number style="width:120px" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" v-model:value="SafetySystemIOHSADDParams.formData.value.Total_B" :min="0" addon-after="条" />
                                </a-form-item>
                                <a-form-item label="C级数量：">
                                    <a-input-number style="width:120px" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" v-model:value="SafetySystemIOHSADDParams.formData.value.Total_C" :min="0" addon-after="条" />
                                </a-form-item>
                                <a-form-item label="D级数量：">
                                    <a-input-number style="width:120px" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" v-model:value="SafetySystemIOHSADDParams.formData.value.Total_D" :min="0" addon-after="条" />
                                </a-form-item>
                            </template>
                        </a-space>
              
                        <a-form-item label="新增：">
                            <a-input-number id="inputNumber" v-on:change="SafetySystemIOHSADDParams.nchange" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" style="width:120px" v-model:value="SafetySystemIOHSADDParams.formData.value.IncreaseCount" :min="0" addon-after="条" />
                        </a-form-item>

                        <a-form-item label="描述：" name="IncreaseDescription">
                            <a-textarea v-on:change="SafetySystemIOHSADDParams.nchange" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" style="width:800px" v-model:value="SafetySystemIOHSADDParams.formData.value.IncreaseDescription">

                            </a-textarea>
                        </a-form-item>
                        <a-form-item label="删减：">
                            <a-input-number id="inputNumber" style="width:120px" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" v-on:change="SafetySystemIOHSADDParams.nchange" v-model:value="SafetySystemIOHSADDParams.formData.value.ReduceCount" :min="0" addon-after="条" />
                        </a-form-item>

                        <a-form-item label="描述：" name="ReduceDescription">
                            <a-textarea v-on:change="SafetySystemIOHSADDParams.nchange" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" style="width:800px" v-model:value="SafetySystemIOHSADDParams.formData.value.ReduceDescription">
                            </a-textarea>
                        </a-form-item>
                        <div class="stitle" style="margin:20px 0">附件</div>
                        <a-form-item label="附件：">
                            <a-upload v-model:file-list="SafetySystemIOHSADDParams.uploadImg.value.fileList"
                                      action="#"
                                      :item-render="SafetySystemIOHSADDParams.itemRender.value"
                                      v-on:change="SafetySystemIOHSADDParams.handleChange">
                                <a-button v-if="SafetySystemIOHSADDParams.uploadImg.value.fileList.length < 8 && SafetySystemIOHSADDParams.urlinfo.value.type!=9" type="primary">+ 上传附件</a-button>

                            </a-upload>
                        </a-form-item>
                        <a-form-item label="备注：">
                            <a-textarea style="width:800px" :disabled="SafetySystemIOHSADDParams.urlinfo.value.type==9" v-model:value="SafetySystemIOHSADDParams.formData.value.Remark">

                            </a-textarea>
                        </a-form-item>
                    </a-form>
                </a-card>
            </header>
            <m-bottom-btns></m-bottom-btns>
        </a-config-provider>
    </a-style-provider>
</div>
@section Js{
    <script src="~/bussiness/js/pg/Performance/edit.js"></script>
    <script src="~/bussiness/js/base/tailwind.js"></script>
    <script>
    </script>
    <script type="module">
        import Composition from '../../bussiness/js/pg/SafetySystem/IOHSADD.js?v=@DateTime.Now.ToString("yyyyMMddHHmm")'
        import localeValues from '../../Bussiness/js/base/es/locale/zh_CN.js'
        singalApp('SafetySystemIOHSADD', Composition, localeValues)
    </script>
}
